<template>
  <div class="index">
    <keep-alive>
      <router-view class="box" />
    </keep-alive>
    <footer></footer>
    <ul>
      <router-link tag="li" to="/home">首页</router-link>
      <router-link tag="li" to="/cate">首页</router-link>
      <router-link tag="li" to="/cart">首页</router-link>
      <router-link tag="li" to="/my">首页</router-link>
    </ul>
  </div>
</template>


<style>
.index {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.box {
  width: 100%;
  flex: 1;
  overflow: auto;
}
footer {
  width: 100%;
  height: 50px;
}
ul {
  width: 100%;
  height: 50px;
  display: flex;
  justify-content: space-around;
  position: fixed;
  bottom: 0;
}
li {
  flex: 1;
  height: 50px;
  line-height: 50px;
  text-align: center;
}
li:active {
  background: pink;
}
</style>